<template>
  <div>
    <van-nav-bar
      :title="data"
      left-text="返回"
      left-arrow
      @click-left="onClickLeft"
    >
      <template #right>
        <router-link :to="{name: 'InitiateGroupChat' }">
          <van-icon name="phone-o" size="22" class="phone" />
        </router-link>
        <router-link :to="{ name: 'ChatSet', query: { data: data } }">
          <van-icon name="user-o" size="22" />
        </router-link>
      </template>
    </van-nav-bar>
  </div>
</template>

<script>
export default {
  name: "Chat",
  data() {
    return {};
  },
  props: {
    data: {
      type: String,
    },
  },
  methods: {
    onClickLeft() {
      this.$router.back();
    },
    onClickRight() {},
  },
  mounted() {
    console.log(this.data);
  },
};
</script>

<style scoped>
.phone {
  margin-right: 0.4rem;
}
</style>